package com.huahua.api.service.entertainment.website.impl;

import com.huahua.api.entity.entertainment.website.pojo.EntertainmentWebsiteGenerateParam;
import com.huahua.api.repository.entertainment.website.EntertainmentWebsiteGenerateParamRepository;
import com.huahua.api.service.entertainment.website.EntertainmentWebsiteGenerateParamService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

/**
 * @author LoveHuaHua
 * @date 2023年08月21日 21:07
 * @description believe in yourself
 */
@Service
@RequiredArgsConstructor
public class EntertainmentWebsiteGenerateParamServiceImpl implements EntertainmentWebsiteGenerateParamService {

    private final EntertainmentWebsiteGenerateParamRepository paramRepository;

    @Override
    public Mono<EntertainmentWebsiteGenerateParam> findById(Integer id) {
        return paramRepository.findById(id);
    }

    @Override
    public Mono<EntertainmentWebsiteGenerateParam> findByUuid(String uuid) {
        return paramRepository.findByUuid(uuid);
    }

    @Override
    public Flux<EntertainmentWebsiteGenerateParam> findByTemplateId(String templateId) {
        return paramRepository.findByTemplateId(templateId);
    }

    @Override
    public Mono<EntertainmentWebsiteGenerateParam> save(EntertainmentWebsiteGenerateParam param) {
        return paramRepository.save(param);
    }

    @Override
    public Mono<Void> deleteById(Integer id) {
        return paramRepository.deleteById(id);
    }
}
